<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script type="text/javascript">
	function uncheck1() {
		var useradd = document.getElementById("useradd");
		if (useradd.tag == 1) {
			useradd.checked = false;
			useradd.tag = 0;
			useradd.value = 0;
		} else {
			useradd.checked = true;
			useradd.tag = 1;
			useradd.value = 1;
		}
	}
	function uncheck2() {
		var userdel = document.getElementById("userdel");
		if (userdel.tag == 1) {
			userdel.checked = false;
			userdel.tag = 0;
			userdel.value = 0;
		} else {
			userdel.checked = true;
			userdel.tag = 1;
			userdel.value = 1;
		}
	}
	function uncheck3() {
		var userupdate = document.getElementById("userupdate");
		if (userupdate.tag == 1) {
			userupdate.checked = false;
			userupdate.tag = 0;
			userupdate.value = 0;
		} else {
			userupdate.checked = true;
			userupdate.tag = 1;
			userupdate.value = 1;
		}
	}
	function uncheck4() {
		var userselect = document.getElementById("userselect");
		if (userselect.tag == 1) {
			userselect.checked = false;
			userselect.tag = 0;
			userselect.value = 0;
		} else {
			userselect.checked = true;
			userselect.tag = 1;
			userselect.value = 1;
		}
	}
	function uncheck5() {
		var ftadd = document.getElementById("ftadd");
		if (ftadd.tag == 1) {
			ftadd.checked = false;
			ftadd.tag = 0;
			ftadd.value = 0;
		} else {
			ftadd.checked = true;
			ftadd.tag = 1;
			ftadd.value = 1;
		}
	}
	function uncheck6() {
		var ftdel = document.getElementById("ftdel");
		if (ftdel.tag == 1) {
			ftdel.checked = false;
			ftdel.tag = 0;
			ftdel.value = 0;
		} else {
			ftdel.checked = true;
			ftdel.tag = 1;
			ftdel.value = 1;
		}
	}
	function uncheck7() {
		var ftupdate = document.getElementById("ftupdate");
		if (ftupdate.tag == 1) {
			ftupdate.checked = false;
			ftupdate.tag = 0;
			ftupdate.value = 0;
		} else {
			ftupdate.checked = true;
			ftupdate.tag = 1;
			ftupdate.value = 1;
		}
	}
	function uncheck8() {
		var ftselect = document.getElementById("ftselect");
		if (ftselect.tag == 1) {
			ftselect.checked = false;
			ftselect.tag = 0;
			ftselect.value = 0;
		} else {
			ftselect.checked = true;
			ftselect.tag = 1;
			ftselect.value = 1;
		}
	}
	function uncheck9() {
		var fradd = document.getElementById("fradd");
		if (fradd.tag == 1) {
			fradd.checked = false;
			fradd.tag = 0;
			fradd.value = 0;
		} else {
			fradd.checked = true;
			fradd.tag = 1;
			fradd.value = 1;
		}
	}
	function uncheck10() {
		var frdel = document.getElementById("frdel");
		if (frdel.tag == 1) {
			frdel.checked = false;
			frdel.tag = 0;
			frdel.value = 0;
		} else {
			frdel.checked = true;
			frdel.tag = 1;
			frdel.value = 1;
		}
	}
	function uncheck11() {
		var frupdate = document.getElementById("frupdate");
		if (frupdate.tag == 1) {
			frupdate.checked = false;
			frupdate.tag = 0;
			frupdate.value = 0;
		} else {
			frupdate.checked = true;
			frupdate.tag = 1;
			frupdate.value = 1;
		}
	}
	function uncheck12() {
		var frselect = document.getElementById("frselect");
		if (frselect.tag == 1) {
			frselect.checked = false;
			frselect.tag = 0;
			frselect.value = 0;
		} else {
			frselect.checked = true;
			frselect.tag = 1;
			frselect.value = 1;
		}
	}
	function uncheck13() {
		var rpadd = document.getElementById("rpadd");
		if (fpadd.tag == 1) {
			fpadd.checked = false;
			fpadd.tag = 0;
			fpadd.value = 0;
		} else {
			fpadd.checked = true;
			fpadd.tag = 1;
			fpadd.value = 1;
		}
	}
	function uncheck14() {
		var rpdel = document.getElementById("rpdel");
		if (fpdel.tag == 1) {
			fpdel.checked = false;
			fpdel.tag = 0;
			fpdel.value = 0;
		} else {
			fpdel.checked = true;
			fpdel.tag = 1;
			fpdel.value = 1;
		}
	}
	function uncheck15() {
		var rpupdate = document.getElementById("rpupdate");
		if (fpupdate.tag == 1) {
			fpupdate.checked = false;
			fpupdate.tag = 0;
			fpupdate.value = 0;
		} else {
			fpupdate.checked = true;
			fpupdate.tag = 1;
			fpupdate.value = 1;
		}
	}
	function uncheck16() {
		var rpselect = document.getElementById("rpselect");
		if (fpselect.tag == 1) {
			fpselect.checked = false;
			fpselect.tag = 0;
			fpselect.value = 0;
		} else {
			fpselect.checked = true;
			fpselect.tag = 1;
			fpselect.value = 1;
		}

	}
	function find(){
		var role = document.getElementById("role");
		window.location.href="findRolePerssionsByRoleAction?role="+role.value;
	}
</script>
</head>
<link href="menu/role.css" rel="stylesheet" type="text/css">
<body bgcolor="#ecf9dc">
	<span style="font-size: 12px;">角色权限设置》》${request.role}</span>
	<form action="updateRolePermissAction" method="post"
		name="rolePermission">
		<table>
			<tr>
				<td>
					<table style="padding:58px 0 0 100px;">
						<tr>
							<td>
								<table class="role-table">
									<tr>
										<td><span class="STYLE1">角色：</span>
										</td>
										<s:if test='#request.role=="d"'>
											<td><select name="role" id="role"
												style="width:170px;display:block;">
													<option value="a">a</option>
													<option value="b">b</option>
													<option value="c">c</option>
													<option value="d" selected="selected">d</option>
											</select>
											</td>
										</s:if>
										<s:elseif test='#request.role=="c"'>
											<td><select name="role" id="role"
												style="width:170px;display:block;">
													<option value="a">a</option>
													<option value="b">b</option>
													<option value="c" selected="selected">c</option>
													<option value="d">d</option>
											</select>
											</td>
										</s:elseif>
										<s:elseif test='#request.role=="b"'>
											<td><select name="role" id="role"
												style="width:170px;display:block;">
													<option value="a">a</option>
													<option value="b" selected="selected">b</option>
													<option value="c">c</option>
													<option value="d">d</option>
											</select>
											</td>
										</s:elseif>
										<s:else>
											<td><select name="role" id="role"
												style="width:170px;display:block;">
													<option value="a">a</option>
													<option value="b">b</option>
													<option value="c">c</option>
													<option value="d">d</option>
											</select>
											</td>
										</s:else>
										<td style="padding-left:30px;"><input type="button"
											value="查询" onclick="find()" />
										</td>
										<td style="padding-left:30px;">
										<input type="submit"
											onclick="javascript:if(confirm('确定修改？')) return true ;else return false;"
											value="修改" /></td>
									</tr>
								</table></td>
						</tr>
						<tr>
							<td>
								<table class="role-permission-table">
									<tr>
										<th>[user](用户表)：</th>
										<td><s:if test="#request.ruser.addE==1">
												<input type="radio" checked="checked" value="1"
													onclick="uncheck1()" id="useradd" name="useradd" />增
										</s:if> <s:else>
												<input type="radio" value="1" onclick="uncheck1()"
													id="useradd" name="useradd" />增
										</s:else></td>
										<td><s:if test="#request.ruser.deleteE==1">
												<input type="radio" checked="checked" value="1"
													onclick="uncheck2()" id="userdel" name="userdel" />删
										</s:if> <s:else>
												<input type="radio" value="1" onclick="uncheck2()"
													id="userdel" name="userdel" />删
										</s:else></td>
										<td><s:if test="#request.ruser.updateE==1">
												<input type="radio" checked="checked" value="1"
													name="userupdate" onclick="uncheck3()" id="userupdate" />改
										</s:if> <s:else>
												<input type="radio" value="1" name="userupdate"
													onclick="uncheck3()" id="userupdate" />改
										</s:else></td>
										<td><s:if test="#request.ruser.selectE==1">
												<input type="radio" checked="checked" value="1"
													name="userselect" onclick="uncheck4()" id="userselect" />查
										</s:if> <s:else>
												<input type="radio" value="1" name="userselect"
													onclick="uncheck4()" id="userselect" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[fault](故障)：</th>
										<td><s:if test="#request.rfault.addE==1">
												<input type="radio" checked="checked" value="1" name="ftadd"
													onclick="uncheck5()" id="ftadd" />增
										</s:if> <s:else>
												<input type="radio" value="1" name="ftadd"
													onclick="uncheck5()" id="ftadd" />增
										</s:else></td>
										<td><s:if test="#request.rfault.deleteE==1">
												<input type="radio" checked="checked" value="1" name="ftdel"
													onclick="uncheck6()" id="ftdel" />删
										</s:if> <s:else>
												<input type="radio" value="1" name="ftdel"
													onclick="uncheck6()" id="ftdel" />删
										</s:else></td>
										<td><s:if test="#request.rfault.updateE==1">
												<input type="radio" checked="checked" value="1"
													name="ftupdate" onclick="uncheck7()" id="ftupdate" />改
										</s:if> <s:else>
												<input type="radio" value="1" name="ftupdate"
													onclick="uncheck7()" id="ftupdate" />改
										</s:else></td>
										<td><s:if test="#request.rfault.selectE==1">
												<input type="radio" checked="checked" value="1"
													name="ftselect" onclick="uncheck8()" id="ftselect" />查
										</s:if> <s:else>
												<input type="radio" value="1" name="ftselect"
													onclick="uncheck8()" id="ftselect" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[fRecord](故障记录)：</th>
										<td><s:if test="#request.rfRecord.addE==1">
												<input type="radio" checked="checked" value="1" name="fradd"
													onclick="uncheck9()" id="fradd" />增
										</s:if> <s:else>
												<input type="radio" value="1" name="fradd"
													onclick="uncheck9()" id="fradd" />增
										</s:else></td>
										<td><s:if test="#request.rfRecord.deleteE==1">
												<input type="radio" checked="checked" value="1" name="frdel"
													onclick="uncheck10()" id="frdel" />删
										</s:if> <s:else>
												<input type="radio" value="1" name="frdel"
													onclick="uncheck10()" id="frdel" />删
										</s:else></td>
										<td><s:if test="#request.rfRecord.updateE==1">
												<input type="radio" checked="checked" value="1"
													name="frupdate" onclick="uncheck11()" id="frupdate" />改
										</s:if> <s:else>
												<input type="radio" value="1" name="frupdate"
													onclick="uncheck11()" id="frupdate" />改
										</s:else></td>
										<td><s:if test="#request.rfRecord.selectE==1">
												<input type="radio" checked="checked" value="1"
													name="frselect" onclick="uncheck12()" id="frselect" />查
										</s:if> <s:else>
												<input type="radio" value="1" name="frselect"
													onclick="uncheck12()" id="frselect" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[RolePermis](权限)：</th>
										<td><s:if test="#request.rfRolePermis.addE==1">
												<input type="radio" checked="checked" value="1"
													onclick="uncheck13()" id="rpadd" />增
										</s:if> <s:else>
												<input type="radio" value="1" name="rpadd"
													onclick="uncheck13()" id="rpadd" />增
										</s:else></td>
										<td><s:if test="#request.rfRolePermis.deleteE==1">
												<input type="radio" checked="checked" value="1" name="rpdel"
													onclick="uncheck14()" id="fpdel" />删
										</s:if> <s:else>
												<input type="radio" value="1" name="rpdel"
													onclick="uncheck14()" id="rpdel" />删
										</s:else></td>
										<td><s:if test="#request.rfRolePermis.updateE==1">
												<input type="radio" checked="checked" value="1"
													name="rpupdate" onclick="uncheck15()" id="fpupdate" />改
										</s:if> <s:else>
												<input type="radio" value="1" name="rpupdate"
													onclick="uncheck15()" id="fpupdate" />改
										</s:else></td>
										<td><s:if test="#request.rfRolePermis.selectE==1">
												<input type="radio" checked="checked" value="1"
													name="rpselect" onclick="uncheck16()" id="fpselect" />查
										</s:if> <s:else>
												<input type="radio" value="1" name="rpselect"
													onclick="uncheck16()" id="fpselect" />查
										</s:else></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td>
								<table class="button-table">
									<tr>
										<td></td><td></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
				<td>
					<table style="padding:0px 0 0 20px;" border=1>
						<tr>
							<td>
								<table class="role-table">
									<tr>
										<td>当前用户角色权限：</td>
										<td><span class="STYLE1">角色：</span>
										</td>
										<td><s:property value="%{#session.user.role}" /></td>

									</tr>
								</table></td>
						</tr>
						<tr>
							<td>
								<table class="role-permission-table">
									<tr>
										<th>[user](用户表)：</th>
										<td><s:if test="#session.ruser.addE==1">
												<input disabled="disabled" type="radio" checked="checked"
													value="1" />增
										</s:if> <s:else>
												<input disabled="disabled" type="radio" value="1" />增
										</s:else></td>
										<td><s:if test="#session.ruser.deleteE==1">
												<input disabled="disabled" type="radio" checked="checked"
													value="1" />删
										</s:if> <s:else>
												<input disabled="disabled" type="radio" value="1" />删
										</s:else></td>
										<td><s:if test="#session.ruser.updateE==1">
												<input disabled="disabled" type="radio" checked="checked" />改
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />改
										</s:else></td>
										<td><s:if test="#session.ruser.selectE==1">
												<input disabled="disabled" type="radio" checked="checked" />查
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[fault](故障)：</th>
										<td><s:if test="#session.rfault.addE==1">
												<input disabled="disabled" type="radio" checked="checked" />增
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />增
										</s:else></td>
										<td><s:if test="#session.rfault.deleteE==1">
												<input disabled="disabled" type="radio" checked="checked" />删
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />删
										</s:else></td>
										<td><s:if test="#session.rfault.updateE==1">
												<input disabled="disabled" type="radio" checked="checked" />改
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />改
										</s:else></td>
										<td><s:if test="#session.rfault.selectE==1">
												<input disabled="disabled" type="radio" checked="checked" />查
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[fRecord](故障记录)：</th>
										<td><s:if test="#session.rfRecord.addE==1">
												<input disabled="disabled" type="radio" checked="checked" />增
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />增
										</s:else></td>
										<td><s:if test="#session.rfRecord.deleteE==1">
												<input disabled="disabled" type="radio" checked="checked" />删
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />删
										</s:else></td>
										<td><s:if test="#session.rfRecord.updateE==1">
												<input disabled="disabled" type="radio" checked="checked" />改
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />改
										</s:else></td>
										<td><s:if test="#session.rfRecord.selectE==1">
												<input disabled="disabled" type="radio" checked="checked" />查
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />查
										</s:else></td>
									</tr>
									<tr>
										<th>[RolePermis](权限)：</th>
										<td><s:if test="#session.rfRolePermis.addE==1">
												<input disabled="disabled" type="radio" checked="checked" />增
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />增
										</s:else></td>
										<td><s:if test="#session.rfRolePermis.deleteE==1">
												<input disabled="disabled" type="radio" checked="checked" />删
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />删
										</s:else></td>
										<td><s:if test="#session.rfRolePermis.updateE==1">
												<input disabled="disabled" type="radio" checked="checked" />改
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />改
										</s:else></td>
										<td><s:if test="#session.rfRolePermis.selectE==1">
												<input disabled="disabled" type="radio" checked="checked" />查
										</s:if> <s:else>
												<input disabled="disabled" type="radio" />查
										</s:else></td>
									</tr>
								</table>
							</td>
						</tr>
					</table></td>
			</tr>
		</table>
	</form>
</body>
</html>
